<?php
class model_sms extends base_model{
	public function __construct() {
		parent::__construct();
	}

	public function mod_sms_list($args){
        $where_txt = "";
        if(!empty($args['sKey'])){
            $where_txt .= " AND `title` LIKE '%{$args['sKey']}%'";
        }

        $sql = "SELECT ~field~ FROM `@@smsline` WHERE 1 {$where_txt} ~order~ ~limit~";
        //取出当前页的数据
        $sql_arr = array(
            'field' => 'id,title,apiurl,queryurl,account,passwd,state',
            'page_current' => $args['page_current'],
            'pagesize' => $args['ps'],
            'order' => ' ORDER BY `id` DESC',
        );
        $datas = $this->getTableRows($sql,$sql_arr);
        return array(
            'datas' => $datas['datas'],
            'record' => $datas['total'],
        );
    }
}